import { Main } from 'element-ui'

import Vue from 'vue'
import Router from 'vue-router'
import login from "../components/login"
import main from "../components/mainhome"
import examinee from "../components/examinee"
import major from "../components/major"
import admission from "../components/admission"
import analyse from "../components/analyse"
Vue.use(Router)

export default new Router({
  routes: [
    {//如果访问的是/，进行重定向进入login页面中
      path: '/',
      redirect: '/login'
    },
    {
      //路由跳转路径
      path: '/login',
      //路由名称
      name: 'login',
      //路由跳转组件
      component: login
    },
    {
      //路由跳转路径
      path: '/mainhome',
      //路由名称
      name: 'mainhome',
      //路由跳转组件
      component: main,
      children:[{
        path:'/',
        name:'in1',
        component:in1
      },{
        path:'/',
        name:'spend1',
        component:spend1
      },{
        path:'/in2',
        name:'admission',
        component:admission
      },{
        path:'/spend2',
        name:'spend2',
        component:spend2
      }
    ]
    }
  ]
})
